
<div class="layui-form" lay-filter="layuiadmin-form-useradmin" style="padding: 20px 0 0 0;">
  <div class="layui-form-item">
    <label class="layui-form-label">版本</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="appVersion" value="{{ d.params.appVersion || '' }}" lay-verify="appVersion" placeholder="1.0.0"  autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">更新描述</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="appDiscreption" value="{{ d.params.appDiscreption || '' }}" lay-verify="appDiscreption" placeholder="" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">强制更新</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <select name="mustUpdate" id="myselect" lay-filter="myselect" lay-verify="mustUpdate" >
          <option value="0">否</option>
          <option value="1">是</option>
       </select>
        <!-- <input type="text" name="mustUpdate" value="{{ d.params.mustUpdate || '' }}" lay-verify="mustUpdate" placeholder="请输入优惠价" autocomplete="off" class="layui-input"> -->
      </script>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">类型</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <select name="appType" id="myselect" lay-filter="myselect" lay-verify="appType" >
          <option value="0">IOS</option>
          <option value="1">ANDROID</option>
       </select>
        <!-- <input type="text" name="appType" value="{{ d.params.appType || '' }}" lay-verify="appType" placeholder="请输入，0：ios，1：android" autocomplete="off" class="layui-input"> -->
      </script>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">下载路径</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" lay-type="file" name="appPath" value="{{ d.params.appPath || '' }}" lay-verify="appPath" placeholder="" autocomplete="off" class="mainPiccls layui-input" >
      </script>
    </div>
    <!-- <button style="float: left;" type="button" class="layui-btn" id="layuiadmin-upload-useradmin" lay-type="file">上传</button>  -->
  </div>


  <div class="layui-form-item">
    <label class="layui-form-label"></label>
    <div class="layui-input-inline">
      <input type="button" lay-submit lay-filter="LAY-user-front-submit" value="确认" class="layui-btn">
    </div>
  </div>
  
</div>

<script src="../../../ueditor1_4_3_3/third-party/jquery-1.10.2.js"></script>
<script>
layui.use(['jquery'],function(){
  var $ = layui.jquery;
})


layui.use(['admin', 'form', 'upload'], function(){
  var $ = layui.$
  ,form = layui.form
  ,setter = layui.setter
  ,upload = layui.upload;

  //上传头像
  upload.render({
    elem: '#layuiadmin-upload-useradmin'
    ,url: setter.myurl + 'admin/uploadApp'
    ,accept: '*'
    ,method: 'post'
    ,acceptMime: '*/*'
    ,type: 'file'
    ,ext: 'txt|jpg|png|gif' //那么，就只会支持这三种格式的上传。注意是用|分割。
    ,done: function(res){
      console.log(res)
      $(".mainPiccls").val(res.data);
      $(this.item).prev("div").children("input").val(res.data)
    }
  });
})


</script>